% TEST_ID: LANG-CLASSDEFS-0131
% CATEGORY: language/classdefs
% 测试值类型 classdef 的构造
function test_classdef()
x = DevMyClass(40)

y1 = my_test(x, 2)
y2 = x.my_test(2)
y3 = x.my_test3()
assert(y3 == 111333)
y4 = x.my_test3();
assert(y4 == 111333);
y5 = x.my_test3;
assert(y5 == 111333);
y6 = x.('my_test3');
assert(y6 == 111333);
y7=x.s_func(123)
assert(y7 == 123);
y8=DevMyClass.s_func(456)
assert(y8 == 456);
field_x = x.x
field_y = x.y
field_z = x.z
field_computed = x.computed

assert(isequal(field_x, 40));
assert(isequal(field_y, 10));
assert(isequal(field_z, 20));
assert(isequal(field_computed, 200));
